#include "Order.h"

Order::Order() {
}

Order::~Order() {
    for (int i = 0; i < (int)orderDetails.size(); i++) {
        delete orderDetails[i];
    }
    orderDetails.clear();
    delete payment;
}

std::string Order::getCreateDate() {
    return createDate;
}

void Order::setCreateDate(std::string p_createDate) {
    createDate = p_createDate;
}

std::string Order::getStatus() {
    return status;
}

void Order::setStatus(std::string p_status) {
    status = p_status;
}

void Order::addOrderDetail(OrderDetail* p_OrderDetail) {
    orderDetails.push_back(p_OrderDetail);
}

std::vector<OrderDetail*> Order::getOrderDetails() {
    return orderDetails;
}

void Order::setPayment(Payment* p_Payment) {
    payment = p_Payment;
}

Payment* Order::getPayment() {
    return payment;
}
